Part Number Hot Search : 
NFSW072 2PD601AQ F5L60 ISL81487 XXXXE 1N60C 24204 NSA3477E
Product Description
Full Text Search
 

To Download AN3991 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  january 2014 docid022332 rev 2 1/15 AN3991 application note how to drive multiple stepper mo tors with the l6470 motor driver enrico poli introduction the l6470 is a flexible device for the driving of bipolar stepper moto rs in multiple motor systems. this application note describes how to drive three bipolar stepper motors in a daisy chain configuration. each motor position and its velocity can be controlled individually or a sequence of position and ve locity commands can be implemented by using the ironpython scripting language included in the dspin? evaluation tool. with the dspin evaluation tool and steval-pcc009v2 interface board, up to eight stepper motors can be controlled in a daisy chain configuration. www.st.com
contents AN3991 2/15 docid022332 rev 2 contents 1 hardware requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2 software requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3 software installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 4 interconnection diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 5 stepper motor characterization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 6 running the motor evalua tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 7 controlling three motors indivi dually . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 7.1 individual motor position control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 7.2 individual motor speed control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 8 controlling three motors with scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 three_motors script text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 appendix a additional instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 motor back emf constant (ke) measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 9 references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 10 revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
docid022332 rev 2 3/15 AN3991 hardware requirements 15 1 hardware requirements each stepper motor being evaluated requires an eval6470h demonstration board. also required is an steval-pcc009v2 interface bo ard that is connected between the pc usb port and the first eval6470h device. a 10-pin flat cable is needed for each eval6470h. a standard usb male to mini usb male cable connects the steval-pcc009v2 to the pc. in addition to the interface boards and cables, a dc power supply with a voltage output between 8 v and 45 v is required.
software requirements AN3991 4/15 docid022332 rev 2 2 software requirements the software needed is the spinfamily eval uation tool which c an be downloaded at www.st.com/dspin. 3 software installation uninstall any previous versions of the dspin evaluation tool. install the dspin evaluation software by clic king on setup windows installer package. after installation is comple te, the dspin software tool is located at c:\program files\stmicroelectronics\ dspin evaluation tool. download the three_motors.py scr ipt from the same page where this application note can be found.
docid022332 rev 2 5/15 AN3991 interconnection diagram 15 4 interconnection diagram with reference to the an3103 application note, on each eval6470h connect the power supply to vs and ground and connect one stepper motor coil to out1a and out2a. connect the other stepper motor coil to out1b and out2b. jumper connections: on the eval6470h, a jumper jp2 is located between the out1a/out2a and out1b/out2b screw connections, just belo w the vdd test point. in the daisy chain connection, jp2 must be open on all eval6470hs except the last one. on the last eval6470h, jp2 is shorted. an add itional eval6470h demonstration boards can be connected in daisy chain mode. up to eight motors can be controlled using a single steval-pcc009v2 interface board. figure 1. daisy chain example to drive two or more boards in daisy chain configuration: 1. open the termination jumpers on all eval6470h demonstration boards except the last one. 2. verify the termination jumper of the last evaluation board is closed. 3. plug the interface board into the pc through the usb cable. 4. if requested, install interface board drivers. 5. connect the interface board 10-pin conn ector to the spi_in connector of the first demonstration board. 6. connect the spi_out connector of the previous demonstration board to the spi_in connector of the next one. 7. repeat item 6 until all the others boards in the chain are connected. information about the termination jumper a nd the spi connectors can be found in the an3103 application note. warning: increasing the number of the devices connected in daisy chain configuration may degrade spi communication performance. if communication issues are found, try to reduce spi clock speed. $0y ,qwhuidfh erdug 67(9$/3&&9 (9$/ - - -3 (9$/ - - -3 7huplqdwlrq mxpshuforvhg 7huplqdwlrq mxpshurshq vwerdug /dvwerdug
stepper motor characterization AN3991 6/15 docid022332 rev 2 5 stepper motor characterization determine rph, the resistance per phase, and lph, the inductance per phase for the stepper motor. these are available from the stepper motor datasheet. these parameters are needed to optimize the back emf compensati on. also ke, the motor back emf constant is needed. this is easily measured as describ ed in the evaluation software help file (see also dspin ke measurement in section : motor back emf constant (ke) measurement on page 11 of this document). 1.8 degree stepper motors are used in this evaluation. 6 running the motor evaluation after connecting the power supply and the stepper motors, and setting jp2 on each eval6470h, turn on the power supply. run the dspin evaluation tool. you can find the application shortcut in the windows start menu: start|programs|stmicroelectronics|dspin evaluati on tool|dspin evaluation tool. select the steval-pcc009v2 interface board. connect the usb connector from the steval-pcc009v2 to the pc?s usb port. complete the driver installation as described in the dspin evaluation tool help file. click the ?connect board? button in the toolbar (or select the menu item toolsiconnect board). the board connection status is indicated in the lower left corner. the positioning tab is highlighted. the device 1 is highlighted at the top of the disp lay. the device 1 is the motor 1, the first of three motors. physically move the shaft of the motor 1 to a position defined as ?home? for demonstration purposes. next, implement the back emf compensa tion. click the bemf icon (or tools|bemf compensation). fill in the app lication parameters and motor parameters (rph , lph, ke). click ?evaluate?, and then ?write?.
docid022332 rev 2 7/15 AN3991 controlling three motors individually 15 7 controlling three motors individually 7.1 individual motor position control next to abs_pos, check the ?autorefresh? box. click ?home?, to writ e the home position into the registers. to move a specific number of steps, e.g. 1000 , type 1000 in the move box. set the direction forward, fw, or backward, bw . click ?move?. the motor move s the requeste d number of steps. to move to an absolute position, enter the posi tion in the goto box. set the direction fw or bw, or auto for the shorte st path. click ?goto?. the mo tor moves to the requested position. 7.2 individual mo tor speed control click the ?speed? tab. enter the speed desired in steps/sec., e. g. 500 in the run box. click fw or bw. verify ?autorefresh? is checked. by default, the maximum allowed speed is 991.821 steps/sec. if it is necessary to run faster, click the ?device configuration? icon (or tools| device configuration), change max. speed to a higher number, and click ?write configuration? to write the new data into the registers. back on the home screen, click ?run? and confirm that the motor shaft is running at the desired speed. a measurement of the shaf t speed can be found in the speed box. to stop the motor, click ?hardstop?, ?hardhiz?, ?softstop? or ?softhiz?. hardstop immediately stops the motor and keeps the l6470 internal mosfets on. in this case, the shaft is locked. hardhiz immediately stops the motor and the internal mosfets are off. the shaft can be freely turned. softstop stops the motor under programmed deceleration set in the device configuration section. (tools|devic e configuration). the l6470 internal mosfets are on and the shaft is locked. softhiz stops the motor under controlled deceleration and the internal mosfets are off. the shaft can be easily turned. to individually operate the motor 2 or motor 3, click the ?device 2? or ?device 3? buttons on the top of the form. repeat the preceding procedure. if, for example, the motor 1 is running at its programmed speed and control is given to the motor 2, the motor 1 continues under its existing program. the motor 1, motor 2 and motor 3 are all controlled independently.
controlling three motors with scripts AN3991 8/15 docid022332 rev 2 8 controlling three motors with scripts the dspin evaluation tool includes a scrip ting environment where commands can be written in the program and immediately executed by running the script. in the scripting environment the devices (and then the motors) are numbered using a zero based indexing (i.e. motor 1 becomes motor 0, motor 2 becomes motor 1, etc.). as an example of how three motors can be controlled, the script thr ee_motors.py performs the following sequence: 1. establishes the home position for all three motors wherever the shafts happen to be. 2. spins motor 0 fw (forward) at 800 steps/sec. for 5 seconds. 3. waits 2 seconds. 4. moves motor 0 b 2 revs or 400 steps, or 51,200 microsteps. 5. waits 2 seconds. 6. spins motor 1 bw (in the opposite dire ction) at 500 steps/sec. for 8 seconds. 7. waits 4 seconds. 8. moves motor 1 fw 4 revs or 8 00 steps, or 102,400 microsteps. 9. spins motor 2 at fw 750 steps/sec. for 2 seconds. 10. waits 1 second. 11. moves motor 2 fw 3.5 revs or 700 steps, or 89,600 microsteps. 12. moves all three motors in the shorte st direction to their home position. ? to run the script ? click the ?script editor? icon (or sele ct the menu item: tools|script editor) ? click the ?open? icon ? select three_motors.py ? click ?open? ? three_motors.py is loaded. ? click ?script? ? click ?run? script all three motors execute t heir position and speed command s as previously described. the text of three_motors.py is attached as three_motors.doc. to run the motors at different speeds or move to different positions, save three_motors.py under a different file name, edit the script to the new requirements and run the new script.
docid022332 rev 2 9/15 AN3991 controlling three motors with scripts 15 three_motors script text motor_a = 0 # motor a is the 1st one motor_b = 1 # motor b is the 2nd one motor_c = 2 # motor c is the 3rd one #1.establish the home position for all three motors wherever the shafts happen to be # set motor a home position resetpos(motor_a) # set motor b home position #resetpos(motor_b) # set motor c home position resetpos(motor_c) #2.spin motor_a fw (forward) at 800 steps/sec for 5 seconds # send the run command # device dir speed run(motor_a, true, 0xd1b7) # wait (about) 5 seconds delay(5000) # milliseconds # stop the motor hardstop(motor_a) #3.wait (about) 2 seconds delay(2000) # milliseconds #4.move motor_a bw 2 revs or 400 steps or 51,200 microsteps # send the move command # device dir microsteps move(motor_a, false, 0xc800) delay(2000) #5.spin motor_b bw (in the opposite direction) at 500 steps/sec for 8 seconds # send the run command # device dir speed run(motor_b, false, 0x8312) # wait (about) 8 seconds delay(8000) # milliseconds # stop the motor hardstop(motor_b) #6.wait (about) 4 seconds delay(4000) # milliseconds #7.move motor_b fw 4 revs or 800 steps or 102400 microsteps
controlling three motors with scripts AN3991 10/15 docid022332 rev 2 # send the move command # device dir microsteps move(motor_b, true, 0x19000) delay(2000) #8.spin motor_c at fw 750 steps/sec for 2 seconds # send the run command # device dir speed run(motor_c, true, 0xc49b) # wait (about) 2 seconds delay(2000) # milliseconds # stop the motor hardstop(motor_c) #9.wait (about) 1 second delay(1000) # milliseconds #10.move motor_c fw 3.5 revs or 700 steps or 89600 microsteps. # send the move command # device dir microsteps move(motor_c, false, 0x15e00) print getparam(motor_a, "abs_pos") print getparam(motor_b, "abs_pos") print getparam(motor_c, "abs_pos") #11.move all three motors in the shortest direction to their home position. gohome(motor_a) gohome(motor_b) gohome(motor_c) print getparam(motor_a, "abs_pos") print getparam(motor_b, "abs_pos") print getparam(motor_c, "abs_pos") print "end"
docid022332 rev 2 11/15 AN3991 additional instructions 15 appendix a additional instructions motor back emf constant (ke) measurement motor back emf constant is the coefficient that relates the mo tor speed to the bemf amplitude. this value is not usually present on stepper moto r datasheets, but it can be easily measured by me ans of an oscilloscope. 1. first of all, connect one of the mo tor phases to an oscilloscope channel. figure 2. motor back emf constant measurement - step 1 2. set the oscilloscope trigger value to the rising or falling edg e of the channel and set the threshold value close to zero (few mv above or below zero). 3. quickly turn the motor shaft (this can also be done by hand). figure 3. motor back emf constant measurement - step 3
additional instructions AN3991 12/15 docid022332 rev 2 4. set the oscilloscope time and voltage scales in order to display a sine wave during the motor rotation. 5. turn the motor until a ?good? sine wave is obtained: a good sine wave keeps its amplitude constant for at least 2 or 3 cycles. 6. this operation may require some attempts. figure 4. motor back emf constant measurement: bad back emf waveform figure 5. motor back emf constant measurement: good back emf waveform
docid022332 rev 2 13/15 AN3991 additional instructions 15 7. measure the peak voltage to frequency ratio of the ?good? sine wave. the resulting value is the motor electric constant expressed in v/hz. figure 6. motor back emf constant measurement - step 7
references AN3991 14/15 docid022332 rev 2 9 references 1. l6470 datasheet 2. an3103 application note. all documentation is available at www.st.com/dspin. 10 revision history table 1. document revision history date revision changes 28-mar-2012 1 initial release. 08-jan-2014 2 updated section 2: software requirements on page 4 (updated tool name, removed la st sentence). updated section 5: stepper motor characterization on page 6 [removed ?(schneider electric m-2222-2.4s)?]. removed section a.1 communication board driver installation procedure. minor modifications throughout document.
docid022332 rev 2 15/15 AN3991 15 please read carefully: information in this document is provided solely in connection with st products. stmicroelectronics nv and its subsidiaries (?st ?) reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described he rein at any time, without notice. all st products are sold pursuant to st?s terms and conditions of sale. purchasers are solely responsible for the choice, selection and use of the st products and services described herein, and st as sumes no liability whatsoever relating to the choice, selection or use of the st products and services described herein. no license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. i f any part of this document refers to any third party products or services it shall not be deemed a license grant by st for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoev er of such third party products or services or any intellectual property contained therein. unless otherwise set forth in st?s terms and conditions of sale st disclaims any express or implied warranty with respect to the use and/or sale of st products including without limitation implied warranties of merchantability, fitness for a parti cular purpose (and their equivalents under the laws of any jurisdiction), or infringement of any patent, copyright or other intellectual property right. st products are not designed or authorized for use in: (a) safety critical applications such as life supporting, active implanted devices or systems wi th product functional safety requirements; (b) aeronautic applications; (c) automotive applications or environments, and/or (d) aerospace applications or environments. where st products are not designed for such use, the purchaser shall use products at purchaser?s sole risk, even if st has been informed in writing of such usage, unless a product is expressly designated by st as being intended for ?automotive, automotive safety or medical? industry domains according to st product design specifications. products formally escc, qml or jan qualified are deemed suitable for use in aerospace by the corresponding governmental agency. resale of st products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by st for the st product or service described herein and shall not create or extend in any manner whatsoev er, any liability of st. st and the st logo are trademarks or registered trademarks of st in various countries. information in this document supersedes and replaces all information previously supplied. the st logo is a registered trademark of stmicroelectronics. all other names are the property of their respective owners. ? 2014 stmicroelectronics - all rights reserved stmicroelectronics group of companies australia - belgium - brazil - canada - china - czech republic - finland - france - germany - hong kong - india - israel - ital y - japan - malaysia - malta - morocco - philippines - singapore - spain - sweden - switzerland - united kingdom - united states of america www.st.com


▲Up To Search▲   

 
Price & Availability of AN3991

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X